<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }

      body {
        width: 100vw;
        height: 100vh;
        background: #2c3e50;
        display: flex;
        justify-content: center;
        align-items: center;
      }

      main {
        width: 300px;
        height: 50px;
      }

      main a {
        width: 100%;
        height: 100%;
        /* background: red; */
        border: solid 5px yellowgreen;
        display: inline-block;
        text-decoration: none;
        color: #fff;
        text-transform: uppercase;
        font-size: 2em;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
        z-index: 1;
      }

      main a::before {
        content: '';
        width: 0;
        height: 100%;
        position: absolute;
        background: red;
        transform: skewX(45deg);
        transition: 2s;
        z-index: -1;
      }

      main a:hover::before {
        width: 200%;
      }
    </style>
  </head>
  <body>
    <main>
      <a href="" class="btn"> houdunren </a>
    </main>
  </body>
</html>
